package com.yqw.spring1219;

public class LinkList {
	private Node head;
	private Node tail;
	private int size;
	public void add(Object o) {
		Node n = new Node(o, null);
		if (head == null) {
			head = n;
			tail = n;
		}
		tail.setNext(n); //增加下一个节点
		tail = n; //记录下一个节点
		size ++;
	}
	
	public int size() {
		return this.size;
	}
}
